<%@ page import="com.neuedu.entity.User" %>
<%@ page import="java.sql.Array" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2023/11/9
  Time: 14:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <style>
        .last{
            background: gray;
            font-weight: 900;
        }

        .odd{
            background: aqua;
        }
        .even{
            background: burlywood;
        }

    </style>
</head>
<body>

<%--    输出一段内容 --%>
<%
   //模拟调用Controller
    String names = "张飞,刘备,关羽";
    request.setAttribute("names",names);
%>

渲染表格
<table border="1" width="100%"  cellpadding="0" cellspacing="0">
    <tr align="center">
        <td>序号</td>
        <td>武将</td>

    </tr>

<%--

  begin="3" end="5"  --%>
    <c:forTokens items="${names}" delims="," var="name"  varStatus="stats" >
        <tr align="center"  >

            <td>${stats.index}  --   ${stats.count}</td>
            <td>${name}</td>

        </tr>
    </c:forTokens>
</table>

</body>
</html>
